package com.dgut.shopManage.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.dgut.common.util.Xtype;
@Entity
@Table(name="t_apply")
public class Apply {
	private Long id;
	private String sName;   			//店铺名称
	private String mName;  				//租客名称
	private String tphone;				//联系方式
	private Xtype type;					//经营类型
	private Date sTime;    				//租用开始时间
	private Date eTime;					//租用结束时间
	private Date aTime;					//申请时间
	
	
	private Shop shop;
	
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	public Shop getShop() {
		return shop;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public String getsName() {
		return sName;
	}
	public String getmName() {
		return mName;
	}
	public String getTphone() {
		return tphone;
	}
	public Xtype getType() {
		return type;
	}
	public Date getsTime() {
		return sTime;
	}
	public Date geteTime() {
		return eTime;
	}
	public Date getaTime() {
		return aTime;
	}

	public void setShop(Shop shop) {
		this.shop = shop;
	}
	public void setaTime(Date aTime) {
		this.aTime = aTime;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}
	public void setmName(String mName) {
		this.mName = mName;
	}
	public void setTphone(String tphone) {
		this.tphone = tphone;
	}
	public void setType(Xtype type) {
		this.type = type;
	}
	public void setsTime(Date sTime) {
		this.sTime = sTime;
	}
	public void seteTime(Date eTime) {
		this.eTime = eTime;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Override
	public String toString() {
		return "Apply [id=" + id + ", sName=" + sName + ", mName=" + mName + ", tphone=" + tphone + ", type=" + type
				+ ", sTime=" + sTime + ", eTime=" + eTime + ", aTime=" + aTime + ",  shop="
				+ shop + "]";
	}
}
